<?php
    class Default_Form_ValidateCart
    {
        public function validFullname($fullname)
        {
            $validate = new Zend_Validate_StringLength(1,100);
		    if($validate->isValid($fullname)) {
		        return true;
		    }
		    else {
		        return false;
		    }
        }
        
        public function validAddress($address)
        {
            $validate = new Zend_Validate_StringLength(1,200);
		    if($validate->isValid($address)) {
		        return true;
		    }
		    else {
		        return false;
		    }
        }
        
        public function validEmail($email)
		{
		    $validate = new Zend_Validate_StringLength(1,100);
		    if($validate->isValid($email)) {
		        $validate = new Zend_Validate_EmailAddress();
		        if($validate->isValid($email))
		            return true;
		        else
		            return false;
		    }
		    else {
		        return false;
		    }
		}
        
        public function validPhone($phone)
        {
            $validate = new Zend_Validate_StringLength(1,15);
		    if($validate->isValid($phone)) {
		        return true;
		    }
		    else {
		        return false;
		    }
        }
    }
